<!DOCTYPE html>
<html lang="en">
  <head>
    <title>SteamControllerManager Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset="utf-8">
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>

    <a name="//apple_ref/objc/Class/SteamControllerManager" class="dashAnchor"></a>

    <a title="SteamControllerManager Class Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="../index.html">
          SteamController 1.3 Docs
        </a>
         (100% documented)
      </p>
    
      <p class="header-col--secondary">
        <form role="search" action="../search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </p>
    
        <p class="header-col header-col--secondary">
          <a class="header-link" href="https://github.com/zydeco/SteamController">
            <img class="header-icon" src="../img/gh.png"/>
            View on GitHub
          </a>
        </p>
    
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="../index.html">SteamController Reference</a>
      <img class="carat" src="../img/carat.png" />
      SteamControllerManager Class Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Categories.html">Categories</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Categories/GCExtendedGamepad%28SteamController%29.html">GCExtendedGamepad(SteamController)</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/SteamController.html">SteamController</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/SteamControllerManager.html">SteamControllerManager</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/SteamControllerButton.html">SteamControllerButton</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/SteamControllerMapping.html">SteamControllerMapping</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/SteamControllerMode.html">SteamControllerMode</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Type%20Definitions.html">Type Definitions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Type%20Definitions.html#/c:SteamController.h@T@SteamControllerButtonHandler">SteamControllerButtonHandler</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Functions.html#/c:@F@NSStringFromSteamControllerButton">NSStringFromSteamControllerButton</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content top-matter">
            <h1>SteamControllerManager</h1>
              <div class="declaration">
                <div class="language">
                  <p class="aside-title">Objective-C</p>
                  <pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">SteamControllerManager</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>

                </div>
                <div class="language">
                  <p class="aside-title">Swift</p>
                  <pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">SteamControllerManager</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>

                </div>
              </div>
            <p><code>SteamControllerManager</code> handles the connection and disconnection of Steam Controllers, and inserts connected Steam
Controllers into the array of controllers returned by <code>[GCController controllers]</code>.</p>

              <div class="slightly-smaller">
                <a href="https://github.com/zydeco/SteamController/tree/master/SteamController/SteamControllerManager.h#L19-L35">Show on GitHub</a>
              </div>
          </div>
        </section>

        <section class="section">
          <div class="section-content">
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)SteamControllerManager(cm)sharedManager"></a>
                    <a name="//apple_ref/objc/Method/+sharedManager" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)SteamControllerManager(cm)sharedManager">+sharedManager</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Returns the shared instance of <code>SteamControllerManager</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">+</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="n">sharedManager</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">shared</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/zydeco/SteamController/tree/master/SteamController/SteamControllerManager.h#L22">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)SteamControllerManager(py)controllers"></a>
                    <a name="//apple_ref/objc/Property/controllers" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)SteamControllerManager(py)controllers">controllers</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Returns the currently connected Steam Controllers. Unless you only want to support Steam Controllers, you should
use <code>[GCController controllers]</code> instead of this property.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">readonly</span><span class="p">)</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n"><a href="../Classes/SteamController.html">SteamController</a></span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">controllers</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">controllers</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SteamController.html">SteamController</a></span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/zydeco/SteamController/tree/master/SteamController/SteamControllerManager.h#L27">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)SteamControllerManager(im)scanForControllers"></a>
                    <a name="//apple_ref/objc/Method/-scanForControllers" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)SteamControllerManager(im)scanForControllers">-scanForControllers</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Detects connected and pairing Steam Controllers.
If a controller is in pairing mode, this will initiate the pairing process. If it is already paired and connected,
it will configure it and post a <code>GCControllerDidConnectNotification</code> notification when it&rsquo;s ready.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">scanForControllers</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">scanForControllers</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/zydeco/SteamController/tree/master/SteamController/SteamControllerManager.h#L33">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Listening"></a>
                <a name="//apple_ref/objc/Section/Listening" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Listening"></a>
                  <h3 class="section-name"><p>Listening</p>
</h3>
                </div>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)SteamControllerManager(cm)listenForConnections"></a>
                    <a name="//apple_ref/objc/Method/+listenForConnections" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)SteamControllerManager(cm)listenForConnections">+listenForConnections</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Starts listening for controller connections.</p>

<p>You should call this method in your app delegate&rsquo;s <code>application:didFinishLaunchingWithOptions:</code> method.</p>

<p>This enables controllers to be detected automatically when they connect/reconnect, without having to call <code>scanForControllers</code>.
 This feature calls IOKit functions dynamically, which is private API on iOS/tvOS, it can be excluded from the build by
 passing <code>-DSTEAMCONTROLLER_NO_PRIVATE_API</code> to the compiler, or using the <code>SteamController/no-private-api</code> subspec in your Podfile.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">+</span> <span class="p">(</span><span class="n">BOOL</span><span class="p">)</span><span class="n">listenForConnections</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">listenForConnections</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/zydeco/SteamController/tree/master/SteamController/SteamControllerManager.h#L48">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </section>

      </article>
    </div>
    <section class="footer">
      <p>&copy; 2021 <a class="link" href="https://github.com/zydeco" target="_blank" rel="external">Jesús A. Álvarez</a>. All rights reserved. (Last updated: 2021-08-03)</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
    </section>
  </body>
</div>
</html>
